import classNames from 'classnames'
import s from './index.module.scss'


export interface BlockProps {
  title: string,
  desc: string,
  className?: string,
  children?: any
}

export default function Block(props: BlockProps) {
  const {title, desc, children, className} = props

  const cls = classNames(s.container, className)

  return (
    <div className={cls}>
      <div className="head">
        <div className={s.title}>{title}</div>
        <div className={s.desc}>{desc}</div>
      </div>
      <div className={s.divider}></div>
      <div className="body">
        {children}
      </div>
    </div>
  )
}